import request from '@/utils/request'

// 查询新闻消息发布列表
export function listNews(query) {
    return request({
        url: '/by/news/list',
        method: 'get',
        params: query
    })
}

// 查询新闻消息发布详细
export function getNews(id) {
    return request({
        url: '/by/news/' + id,
        method: 'get'
    })
}

// 新增新闻消息发布
export function addNews(data) {
    return request({
        url: '/by/news',
        method: 'post',
        data: data
    })
}

// 修改新闻消息发布
export function updateNews(data) {
    return request({
        url: '/by/news',
        method: 'put',
        data: data
    })
}

// 删除新闻消息发布
export function delNews(id) {
    return request({
        url: '/by/news/' + id,
        method: 'delete'
    })
}
